home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Diamond Collection
/
The Diamond Collection (Software Vault)(Digital Impact).ISO
/
cdr45
/
mdidmo.zip
/
MDIDRAW1.FRM
< prev
next >
Wrap
Text File
|
1994-04-29
|
4KB
|
176 lines
VERSION 2.00
Begin Form frmChild
Caption = "Form2"
ClientHeight = 3225
ClientLeft = 1620
ClientTop = 2865
ClientWidth = 6885
FontBold = -1 'True
FontItalic = -1 'True
FontName = "MS Sans Serif"
FontSize = 30
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 3915
Left = 1560
LinkTopic = "Form2"
MDIChild = -1 'True
ScaleHeight = 3225
ScaleWidth = 6885
Top = 2235
Visible = 0 'False
Width = 7005
Begin CommandButton Command1
Caption = "&Hide Me!"
Height = 345
Left = 180
TabIndex = 0
Top = 180
Width = 1755
End
Begin Menu mMain
Caption = "&Child"
Index = 0
Begin Menu mForm
Caption = "&Hide "
Index = 0
Shortcut = ^H
End
Begin Menu mForm
Caption = "&Unload "
Index = 1
Shortcut = ^U
End
Begin Menu mForm
Caption = "-"
Index = 2
End
Begin Menu mForm
Caption = "&Show All"
Index = 3
Shortcut = ^S
End
Begin Menu mForm
Caption = "-"
Index = 4
End
Begin Menu mForm
Caption = "E&xit"
Index = 5
Shortcut = ^X
End
End
Begin Menu mMain
Caption = "&Window"
Index = 1
Begin Menu mWin
Caption = "&Cascade"
Index = 0
End
Begin Menu mWin
Caption = "Tile &Horizontally"
Index = 1
End
Begin Menu mWin
Caption = "Tile &Vertically"
Index = 2
End
Begin Menu mWin
Caption = "&Arrange Icons"
Index = 3
End
Begin Menu mWin
Caption = "-"
Index = 4
End
Begin Menu mWin
Caption = "Select &Window"
Index = 5
WindowList = -1 'True
End
End
End
'---------------------------------------------------------------------------
' MDI Background Demo Program, Copyright (c) 1994 Karl E. Peterson
' Redistributed by permission. CompuServe: 72302,3707
' See MDIDEMO.BAS for complete description
'---------------------------------------------------------------------------
'Default behavior
DefInt A-Z
Option Explicit
'Index into File menu
Const mnfHide = 0
Const mnfUnload = 1
Const mnfShowAll = 3
Const mnfExit = 5
'Index into Window menu
Const mnwCascade = 0
Const mnwHorizontal = 1
Const mnwVertical = 2
Const mnwArrange = 3
Sub Command1_Click ()
mdiHide Me
End Sub
Sub Form_Load ()
End Sub
Sub Form_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
'Update status bar
DisplayStatus ""
End Sub
Sub Form_Paint ()
'Display something on the form
If WindowState <> MINIMIZED Then
Cls
CurrentX = (ScaleWidth - TextWidth(Caption)) \ 2
CurrentY = (ScaleHeight - TextHeight(Caption)) \ 2
Print Caption
End If
End Sub
Sub Form_Resize ()
'Paint something on the form
Refresh
End Sub
Sub Form_Unload (Cancel As Integer)
'Set tracking element so this slot can be reused
fState(Val(Tag)) = frmDeleted
End Sub
Sub mForm_Click (Index As Integer)
'React to menu picks
Select Case Index
Case mnfHide: mdiHide Me
Case mnfUnload: Unload Me
Case mnfShowAll: mdiShowAll
Case mnfExit: Unload frmMain
End Select
End Sub
Sub mWin_Click (Index As Integer)
'React to menu picks
Select Case Index
Case mnwCascade: mdiArrange WM_MDICASCADE
Case mnwHorizontal: mdiArrange MDITILE_HORIZONTAL
Case mnwVertical: mdiArrange MDITILE_VERTICAL
Case mnwArrange: mdiArrange WM_MDIICONARRANGE
End Select
End Sub